<div class="member-main member-main2" id="J_DataTable">
	<div class="page-article" id="main">
		<div class="member_welhead"><ins></ins><b><{t}>订单确认<{/t}></b> </div>
		<!--div id="member_notify" class="member-notify">
		<!--<table class="member-grid switchable" id="switchable">
			<tr><td>
				<div class="operations mr_5" style="margin-bottom:15px;">
						<span class="lineall" style="margin-top:4px;"><input type="checkbox" class=" all-selector" onclick="selectAll()"><label><{t}>全选<{/t}></label></span>
						<button class="trigger-btn" id="confirm_batch" onclick="javascript:;" type="button" style="background-color:gray;border:0;color:white;padding:5px 20px;"><{t}>批量确认库存<{/t}>
						</button>
					</div>
			</td></tr>
		</table>-->
		<div class="member-mod">
			<table class="member-grid">
				<tr>
					<td colspan="6" style=" padding:5px 10px;border-left: 1px solid #eee;border-right: 1px solid #eee;border-bottom: 1px solid #eee;">
						<h3><b><{t}>订单号：<{/t}><{$order_id}></b></h3>
					</td>
				</tr>
			</table>
		    <form action="<{link app=b2c ctl=site_member act=do_confirm_stock_again}>" method="post">
			    <input type="hidden" name="order_id" value="<{$order_id}>">
				<table class="member-grid" style="text-align:center">
					<thead>
						<tr>
							<th><!--input type="checkbox" class=" all-selector" onclick="selectAll()"--></th>
							<th><{t}>商品名称<{/t}></th>
							<th><{t}>单价<{/t}></th>
							<th><{t}>购买数量<{/t}></th>
							<th><{t}>供应商确认数量<{/t}></th>
							<{if $has_rg}>
							<th><{t}>推荐商品<{/t}></th>
							<th><{t}>是否使用推荐商品<{/t}></th>
							<{/if}>
							<th><{t}>操作<{/t}></th>
						</tr>
					</thead>
					<tbody>
						<{foreach from=$list item=items}>
						<tr class="cart-product">
							<td>
							    <!--input class="selector" type="checkbox" name="item[]" value="<{$items.obj_id}>"-->
								<input type="hidden" name="item[]" value="<{$items.obj_id}>">
							</td>
							<td><img style="float:left;margin:5px 0px 5px 30px" src="<{$items.goods.image_default_id|storager:'s'}>" width="50" height="50"/><span style="float:left;margin-top:20px;margin-left:10px;"><{$items.name}></span></td>
							<td><{$items.buy_price|cur}></td>
							<td><{$items.quantity}></td>
							<td>
							    <ul>
								    <li>
									<{if $items.confirm_num}><{$items.confirm_num}><{else}>0<{/if}>
									<{if $items.confirm_num && $items.confirm_num < $items.quantity || !$items.confirm_num}><{t}><em class="red">（库存不足）</em><{/t}><{/if}>
									</li> 
									<{if $items.goods.glink}> <li><{t}><em class="red">（库存不足）</em><{/t}> </li><{/if}>
								</ul>
							</td>
							<{if $has_rg}>
							<td>
							    <{if $items.goods.glink}> 
								<a href="<{link app=b2c ctl=site_product arg0=$items.goods.glink.goods.products.0.product_id}>"> <{$items.goods.glink.goods.name}> </a> 
								<span></span><span></span><em class="red">*<{$items.quantity}></em>
								<{/if}>
							</td>
							<td>
							    <{if $items.goods.glink}> 
								<select name="rg_status[<{$items.goods.glink.goods.goods_id}>]">
									<option value="0" selected><{t}>是<{/t}></option>
									<option value="1"><{t}>否<{/t}></option>
								</select>
								<{/if}>
							</td>
							<{/if}>
							<td>
								<a href="<{link app=b2c ctl=site_member act=remove_goods arg=$items.obj_id}>"  class="single_confirm"><i class="icon icon-warning" style="font-size:25px;vertical-align:top;">#</i></a>
								<!--a href="#" class="single_confirm"><i class="icon icon-success" style="font-size:25px">%</i></a-->
							</td>
						</tr>
						<{/foreach}>
						<tr><td <{if $has_rg}> colspan=7 <{else}> colspan=5 <{/if}> style="margin:auto;">
						    <{if count($list) > 0}><br/>
						    <button type="submit" class="btn btn-caution action-sendmsg" style="margin:0px 0px 15px 0px"><span><span><{t}>确认<{/t}></span></span></button>
							<{else}>
                            <{t}>暂无订单可确认<{/t}>
							<{/if}>
						</td></tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</div>

<script>
var confirm = $('J_DataTable');
confirm.addEvents({
	'click:relay(.single_confirm)':function(e){
		e.preventDefault();
		var self = this;
		Dialog.confirm('<{t}>确认移除此商品？<{/t}>', function(e){
            if(e) {
				new Request({
					url:self.href,
					data:null,
					method:'post',
					onSuccess: function(rs) {
						self.getParent('tr').destroy();
					}
				}).send();	
            }
        });
	}
});
</script>